package com.xavier.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Schema(description = "资源入参")
public class ResourceDTO implements Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;


    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long id;

    @Schema(description = "父id")
    private Long parentId;

    @Schema(description = "资源编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "资源编码不能为空")
    @NotEmpty(message = "资源编码不能为空")
    @Size(max = 100, message = "资源编码不能超过100位")
    private String resourceCode;

    @Schema(description = "资源类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "资源类型不能为空")
    private Byte resourceType;

    @Schema(description = "资源名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "资源名称不能为空")
    @NotEmpty(message = "资源名称不能为空")
    @Size(max = 100, message = "资源名称不能超过100位")
    private String resourceName;

    @Schema(description = "组件路径")
    @Size(max = 100, message = "组件路径不能超过100位")
    private String component;

    @Schema(description = "组件名称")
    @Size(max = 100, message = "组件名称不能超过100位")
    private String componentName;

    @Schema(description = "地址")
    @Size(max = 255, message = "地址不能超过255位")
    private String url;

    @Schema(description = "图标")
    @Size(max = 100, message = "图标不能超过100位")
    private String icon;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序不能为空")
    private Integer sortNumber;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否启用不能为空")
    private Boolean isEnable;








}
